<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
  <title>修改用户信息</title>
  <link rel="stylesheet" type="text/css" href="./assets/css/bootstrap.min.css" >
</head>
<?php
$row=$data['users'];
?>
<body><font color=white>
<center><h2>请修改用户信息</h2></center>
<form  class="form-horizontal" method="post" action="index.php?c=index&m=updateuser" enctype="multipart/form-data">
<input type="hidden" name="uid" value="<?php echo $row['uid']; ?>"> 
<div  class="form-group">
    <label for="inputEmail3" class="col-md-3 control-label">姓名</label>
    <div class="col-md-6">
      <input type="text" class="form-control" id="inputEmail3" placeholder="name" name="username" value="<?php echo $row['uname'];?>">
    </div>
  </div>

  <div class="form-group">
    <label for="inputSex3" class="col-md-3 control-label">性别</label>
    <div class="col-md-6">
    <label class="radio-inline">
  <input type="radio" name="gender" id="inlineRadio1" value="0"<?php if($row['gender']==0){
  echo "checked";
  }?>>男
</label>
<label class="radio-inline">
  <input type="radio" name="gender" id="inlineRadio2" value="1"<?php if($row['gender']==1){
  echo "checked";
  }?>>女
</label>
    </div>
  </div>

  <div class="form-group">
    <label for="inputDate3" class="col-md-3 control-label">生日</label>
    <div class="col-md-6">
      <input type="date" class="form-control" id="inputDate3" placeholder="birthdate" name="birthdate" value="<?php echo $row['birthdate'];?>">
    </div>
  </div>

  <div class="form-group">
    <label for="inputHobby3" class="col-md-3 control-label">爱好</label>
    <div class="col-md-6">
      <label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox1" name="hobby[]" value="旅游"<?php if (strstr(
$row['hobby'], '旅游')) {
      echo "checked";
    }?>>旅游
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox2" name="hobby[]" value="登山"<?php if(strstr($row['hobby'],'登山')){
  echo "checked";
  } ?>>登山
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox3" name="hobby[]" value="上网"<?php if(strstr($row['hobby'],'上网')){
  echo "checked";
  } ?>>上网
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox3" name="hobby[]" value="游泳"<?php if(strstr($row['hobby'],'游泳')){
  echo "checked";
  } ?>>游泳
</label>
    </div>
  </div>

  <div class="form-group">
    <label for="inputDegree3" class="col-md-3 control-label">学历</label>
    <div class="col-md-6">
      <select class="form-control" name="degree">
        <option value="1"<?php if ($row['degree']==1){
        echo "selected";}?>>高中</option>
    <option value="2"<?php if ($row['degree']==2){
        echo "selected";}?>>大学</option>
    <option value="3"<?php if ($row['degree']==3){
        echo "selected";}?>>研究生</option>
    <option value="4"<?php if ($row['degree']==4){
        echo "selected";}?>>博士</option>
</select>
    </div>
  </div>

  <div class="form-group">
    <label for="inputIntro3" class="col-md-3 control-label">自我介绍</label>
    <div class="col-md-6">
      <textarea class="form-control" rows="3" id="inputIntro3" name="intro"><?php echo $row['intro']?></textarea>
    </div>
  </div>

  <div class="form-group">
    <label for="inputImg3" class="col-md-3 control-label">头像</label>
           <div class="col-md-4">
           <input type="file" id="inputImg3" name="pic">
           原头像:<img src="./photos/<?php echo $row['pic'];?>" width="80" height="80" alt="">
    </div>
  </div>

<div class="form-group">
    <div class="col-sm-offset-5 col-md-5">
      <button type="submit" class="btn btn-default" value="修改">修改</button>
    </div>
  </div>
</form>
</font>
</body>
</html>


